//
//  BaseViewController.swift
//  Box
//
//  Created by mn on 2025/3/30.
//

import UIKit

class BaseViewController: UIViewController {
    let nav = NavigationView()
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .white
        view.addSubview(nav)
        nav.snp.makeConstraints { make in
            make.left.right.equalToSuperview()
            make.top.equalTo(view.safeAreaLayoutGuide.snp.top)
            make.height.equalTo(44)
        }
        nav.backButton.addAction {
            [weak self] in
            self?.navigationController?.pop()
        }
    }
    override var title: String?{
        didSet{
            nav.title = title
        }
    }
}
